<?php

class Module_model extends CI_Model
{

    private $_table = 'sm_module';

    public function __construct()
    {
        parent::__construct();
    }

    function addModule($insertData = array())
    {
        $result = $this->db->insert($this->_table, $insertData);
        return $result;
    }

    function getList()
    {
        $this->db->from($this->_table);
        $result = $this->db->get();
        return $result->result();
    }

    function deleteAll()
    {
        $this->db->empty_table($this->_table);
    }

}
